package com.jamie.api.account;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author Jamie
 * @date 2020/4/13
 */
@FeignClient("account")
@RequestMapping("account")
public interface AccountService {

    /**
     * 扣减账户余额
     *
     * @param userId 用户id
     * @param money  扣减金额
     */
    @PostMapping
    void debit(@RequestParam("userId") String userId, @RequestParam("money") int money);
}
